package controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import dto.MemberDTO;

@Controller
public class TilesTestController {

	@RequestMapping("/mainPage.do")
	public String mainPage(){
		return "main"; //tile설정 - definition의 name속성의 값을 viewName으로 return.
	}
	@RequestMapping("/registerForm.do")
	public String registerForm(){
		return "register_form";
	}
	@RequestMapping("/registerMember.do")
	public ModelAndView registerMember(MemberDTO mdto){
		System.out.println("회원 등록 처리 - 데이터 : "+mdto);
		return new ModelAndView("register_success","mdto",mdto);
	}
	@RequestMapping("/myjsp.do")
	public ModelAndView myjsp(){
		return new ModelAndView("myjsp");
	}
	@RequestMapping("/yourjsp.do")
	public String yourjsp(){
		return "yourjsp";
	}
}
